import ChooseAgreement from './components/choose-agreement/choose-agreement';
import MySearchInput from './components/my-search-input/my-search-input';
import MyCells from './components/MyCells/MyCells';
import UniTag from './components/uni-tag/uni-tag';
import VTabs from './components/v-tabs/v-tabs';
import WPicker from './components/w-picker/w-picker';

import Utils from './utils/index.js';

const UI_NAME = 'Cc';

const RegComponents = [
    ChooseAgreement,
    MySearchInput,
    MyCells,
    UniTag,
    VTabs,
    WPicker
]

const registerComponents = function(app, els) {
    els.map(c => {
        app.component(UI_NAME + c.name, c);
    })
}

const registerUtils = function(app) {
  app.prototype['$' + UI_NAME + 'u'] = Utils;
}


export default {
    install: function(app) {
        registerComponents(app, RegComponents);
        registerUtils(app)
    }
}